/******************************************************************************

            Copyright (C), 2011-2012, All Rights Reserved.

 ******************************************************************************
  File Name     : singleton.h
  Version       : Initial Draft
  Author        : junshenmeng
  Created       : 2012-10-28
  Last Modified :
  Description   : 
  History       :
  1.Date        : 2012-10-28
    Author      : junshenmeng
    Modification: Created file

******************************************************************************/



#ifndef SINGLETON_H_
#define SINGLETON_H_


#define DECLARE_SINGLETON(ClassName); \
public: \
static ClassName& instance() \
{ \
	static ClassName _instance; \
	return _instance; \
} \
private: \
ClassName(void); \
ClassName(const ClassName&); \
ClassName& operator= (const ClassName &);
//End of define DECLARE_SINGLETON(ClassName);

#endif /* SINGLETON_H_ */
